package com.rzcode.coinex.kernel.dao.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.rzcode.coinex.kernel.common.enums.BooleanEnum;
import com.rzcode.coinex.kernel.common.enums.WithdrawStateEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 提币申请
 *
 * @author Bridge.Xu
 * @date 2020年01月29日
 */

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "withdraw_record")
public class WithdrawRecord {

    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 申请人id
     */
    @ApiModelProperty(value = "申请人id")
    private Long memberId;

    /**
     * 币种
     */
    @ApiModelProperty(value = "币种")
    private Coin coin;
    /**
     * 申请总数量
     */
    @ApiModelProperty(value = "申请总数量")
    private BigDecimal totalAmount;
    /**
     * 手续费
     */
    @ApiModelProperty(value = "手续费")
    private BigDecimal fee;
    /**
     * 预计到账数量
     */
    @ApiModelProperty(value = "预计到账数量")
    private BigDecimal arrivedAmount;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    /**
     * 交易时间
     */
    @ApiModelProperty(value = "交易时间")
    private LocalDateTime dealTime;

    /**
     * 提现状态
     */
    @ApiModelProperty(value = "提现状态")
    private WithdrawStateEnum status = WithdrawStateEnum.PROCESSING;
    /**
     * 是否是自动提现
     */
    @ApiModelProperty(value = "是否是自动提现")
    private BooleanEnum isAuto;

    /**
     * 审核人
     */
    @ApiModelProperty(value = "审核人")
    private Admin admin;

    @ApiModelProperty(value = "是否自动提现")
    private BooleanEnum canAutoWithdraw;

    /**
     * 交易编号
     */
    @ApiModelProperty(value = "交易编号")
    private String transactionNumber;
    /**
     * 提现地址
     */
    @ApiModelProperty(value = "提现地址")
    private String address;

    @ApiModelProperty(value = "备注")
    private String remark;
}
